﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: 'admin',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: 'sub-page',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/configinfo',
    name: 'config-info',
    icon: 'profile',
    routes: [
      {
        path: '/configinfo/hostsinfo',
        name: 'hosts-info-list',
        component: './configinfo/HostsInfoList',
      },
      {
        path: '/configinfo/apptemplate',
        name: 'apps-template-list',
        component: './configinfo/AppsTemplateMgr',
      },
      {
        path: '/configinfo/appsinfo',
        name: 'apps-info-list',
        component: './configinfo/AppsInfoList',
      },
      {
        // 带参数的跳转
        path: '/configinfo/appcfg',
        name: 'apps-config-details',
        component: './configinfo/AppCfgDetails',
        // 在路由中不展示
        hideInMenu: true,

      },
      {
        path: '/configinfo/middleware',
        name: 'middleware-config',
        component: './configinfo/MiddlewareCfgDetails',
        // 在路由中不展示
        // hideInMenu: true,

      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
